/*
 * @Description:
 * @version:
 * @Author: sunqian_sr
 * @Date: 2023-01-11 18:43:59
 * @LastEditors: Andy
 * @LastEditTime: 2023-02-15 14:55:40
 */
import { Http } from '@/common/api'
// 列表
export const listUrl = '/upms/template/page'

/**
 * 新增模板
 * @param params
 * @return {*|Promise}
 */
export const apiPostAddTemplate = async (params) => Http.post('/upms/template/add', params)
/**
 * 编辑模板
 * @param params
 * @return {*|Promise}
 */
export const apiPutEditTemplate = async (params) => Http.put('/upms/template/update', params)

/**
 * 删除模板
 * @param ids
 * @return {*|Promise}
 */
export const apiDeleteTemplate = async (ids) => Http.delete(`/upms/template/batch/delete/${ids}`)
/**
 * 根据ID查询详情
 * @param id
 * @return {*|Promise}
 */
export const apiGetTemplateInfo = async (id) => Http.get(`/upms/template/findById/${id}`)
/**
 * 批量启用
 * @param params
 * @return {*|Promise}
 */
export const apiPutEnableTemplate = async (params) => Http.put('/upms/template/batch/enable', params)

/**
 * 批量停用
 * @param params
 * @return {*|Promise}
 */
export const apiPutDisableTemplate = async (params) => Http.put('/upms/template/batch/disable', params)
